<!--
* @Description: 平台信息 - 表单
* @Author: DHL
* @Date: 2022-03-14 16:51:47
 * @LastEditors: DHL
 * @LastEditTime: 2022-06-15 10:12:14
-->
<template>
  <tw-dialog
    v-model="visible"
    :title="title"
    :loading="loading"
    width="600px"
    height="300px"
    @close="handleClose"
  >
    <el-form ref="dbFormRef" :model="dbForm" :rules="rules" label-width="90px">
      <el-form-item label="编码" prop="code">
        <el-input v-model="dbForm.code" clearable placeholder="请输编码"></el-input>
      </el-form-item>

      <el-form-item label="名称" prop="name">
        <el-input v-model="dbForm.name" clearable placeholder="请输名称"></el-input>
      </el-form-item>

      <el-form-item label="有效状态" prop="status">
        <el-select v-model="dbForm.status" clearable placeholder="请选择有效状态">
          <tw-dic dicKey="undefined"></tw-dic>
        </el-select>
      </el-form-item>
    </el-form>

    <template #footer>
      <el-button @click="handleReset(true)">取 消</el-button>
      <el-button v-if="action === 'add'" type="warning" @click="handleSubmit(true)">
        提交并继续
      </el-button>
      <el-button v-if="action !== 'view'" type="primary" @click="handleSubmit(false)">
        提 交
      </el-button>
    </template>
  </tw-dialog>
</template>

<script src="./useForm.ts"></script>

<style scoped lang="scss"></style>
